package com.bjyhl.medical.main.news;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.bjyhl.core.fragments.bottom.BottomItemFragment;
import com.bjyhl.medical.R;
import com.bjyhl.medical.main.news.list.NewsListFragment;
import com.bjyhl.medical.main.news.cat.NewsCatListFragment;

/**
 * Created by Natalya on 2019/1/27 18:22
 * Note: 主页fragment
 */

public class NewsFragment extends BottomItemFragment {
    @Override
    public Object setLayout() {
        return R.layout.fragment_news;
    }

    @Override
    public void onBindView(@Nullable Bundle savedInstanceState, @NonNull View root) {
    }

    @Override
    public void onLazyInitView(@Nullable Bundle savedInstanceState) {
        super.onLazyInitView(savedInstanceState);
        final NewsCatListFragment newsCatListFragment = new NewsCatListFragment();
        getSupportDelegate().loadRootFragment(R.id.news_cat_list_container, newsCatListFragment);
        getSupportDelegate().loadRootFragment(R.id.news_cnt_list_container, NewsListFragment.newInstance(1));
    }
}
